﻿package mortal.game.view.wizard.panel
{
    import Message.DB.Tables.*;
    import Message.Public.*;
    import __AS3__.vec.*;
    import baseEngine.modifiers.*;
    import com.gengine.global.*;
    import com.gengine.resource.*;
    import com.greensock.*;
    import com.greensock.easing.*;
    import com.mui.controls.*;
    import com.mui.core.*;
    import com.mui.utils.*;
    import extend.language.*;
    import fl.data.*;
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;
    import frEngine.*;
    import frEngine.effectEditTool.temple.*;
    import frEngine.event.*;
    import frEngine.pools.*;
    import frEngine.primitives.object2d.*;
    import frEngine.render.layer.*;
    import mortal.common.*;
    import mortal.common.display.*;
    import mortal.common.global.*;
    import mortal.component.gconst.*;
    import mortal.component.ui.*;
    import mortal.component.window.*;
    import mortal.game.cache.*;
    import mortal.game.cache.packCache.*;
    import mortal.game.events.*;
    import mortal.game.manager.*;
    import mortal.game.manager.window3d.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.resource.info.item.*;
    import mortal.game.resource.tableConfig.*;
    import mortal.game.scene3D.map3D.*;
    import mortal.game.scene3D.model.data.*;
    import mortal.game.scene3D.model.player.*;
    import mortal.game.scene3D.model.pools.*;
    import mortal.game.scene3D.player.*;
    import mortal.game.utils.*;
    import mortal.game.view.common.*;
    import mortal.game.view.common.display.*;
    import mortal.game.view.common.item.*;
    import mortal.game.view.copy.ChallengeCopy.view.*;
    import mortal.game.view.skill.*;
    import mortal.game.view.wizard.data.*;
    import mortal.mvc.core.*;

    public class WizardInfoPanel extends WizardBasePanel
    {
        private var _currentWizardData:WizardData;
        private var _isUseGold:Boolean = true;
        private var _spEquipMentList:Vector.<OtherEquipItem>;
        private var _topPart:GSprite;
        private var _bottomPart:GSprite;
        private var _leftPart:GSprite;
        private var _rightPart:GSprite;
        private var _tabBar:GTileList;
        private var _roleBg:GImageBitmap;
        private var _upgradeBtn:GLoadingButton;
        private var _activeWizardBtn:GLoadingButton;
        private var _starUpBtn:GLoadingButton;
        private var _skillItem:WizardSkillItem;
        private var _levelBg:GBitmap;
        private var _level:GTextFiled;
        private var _name:GImageBitmap;
        private var _decName:GImageBitmap;
        private var _attrName:GImageBitmap;
        private var _soulBg:GImageBitmap;
        private var _decTxt:GTextFiled;
        private var _rate:GTextFiled;
        private var _skillInfoTxt:GTextFiled;
        private var _soulPanel:WizardSoulPanel;
        private var _levelUpItem:BaseItem;
        private var _levelUpItemtxt:GTextFiled;
        private var _xhclTxt:GTextFiled;
        private var _autoUseGold:GCheckBox;
        private var _comBat:BitmapNumberText;
        private var _starPanel:StarPointPanel;
        private var _vcAttributeName2:Vector.<String>;
        private var _vcAttributeNameText:Vector.<GTextFiled>;
        private var _vcAttributeValueText:Vector.<BitmapNumberText>;
        private var _vcAttributeAddValueText:Vector.<GTextFiled>;
        private var _vcAttributeAddValueBitMap:Vector.<GBitmap>;
        private var _attrSprite:GSprite;
        private var _consumeBox:GConsumeBox;
        private var _consumeBox2:GConsumeBox;
        protected var _img2d:Img2D;
        protected var _scale9gridImg2d:Scale9GridImg2DEx;
        protected var _rect3d:Rect3DObject;
        protected var _bodyPlayer:WizardActionPlayer;
        private var _3dRotationSp:GSprite;
        private var _3dRotationBm:GBitmap;
        private var _effectPlayer:EffectPlayer;
        private var _starUpEffectPlayer:EffectPlayer;
        private var _window:Window;
        private var timerContorler:TimeControler;
        private var _showTween:TweenMax;
        private var _extShowTween:TweenMax;
        private var _hideTween:TweenMax;
        private var _extHideTween:TweenMax;
        private var _modelX:Number;
        private var _lastWizardModel:TModel;
        private var _lastBodyPlayer:WizardActionPlayer;
        private var _effectVec:Vector.<EffectPlayer>;
        private var _startX:Number;
        private var _startY:Number;
        private var _endX:Number;
        private var _endY:Number;
        private var _baseDelta:int = 3;
        private var _modelY:int;
        private var _effectEquip:OtherEquipItem;
        private var _effectSkill:WizardSkillItem;
        private var _isOver:Boolean = false;
        public static const starPanel:int = 1;
        public static const levelUpItemtxt:int = 2;
        public static const upgradeBtn:int = 3;
        public static const consumeBox2:int = 4;

        public function WizardInfoPanel(param1:Window)
        {
            this._vcAttributeName2 = new Vector.<String>;
            this._vcAttributeNameText = new Vector.<GTextFiled>;
            this._vcAttributeValueText = new Vector.<BitmapNumberText>;
            this._vcAttributeAddValueText = new Vector.<GTextFiled>;
            this._vcAttributeAddValueBitMap = new Vector.<GBitmap>;
            this._effectVec = new Vector.<EffectPlayer>;
            this._window = param1;
            this.timerContorler = TimeControler.createTimerInstance();
            this.timerContorler.unActive();
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            var _loc_1:GTextFormat = null;
            var _loc_4:GTextFiled = null;
            var _loc_5:BitmapNumberText = null;
            var _loc_6:GBitmap = null;
            var _loc_7:GTextFormat = null;
            var _loc_8:int = 0;
            super.createDisposedChildrenImpl();
            _loc_1 = GlobalStyle.textFormatBai.left();
            this._3dRotationSp = UICompomentPool.getUICompoment(GSprite);
            this._3dRotationSp.mouseEnabled = true;
            this.addChild(this._3dRotationSp);
            this._3dRotationBm = GlobalClass.getBitmap(BitmapDataConst.AlphaBMD);
            this._3dRotationBm.width = SceneRange.display.width;
            this._3dRotationBm.height = SceneRange.display.height;
            this._3dRotationSp.addChild(this._3dRotationBm);
            this._roleBg = UIFactory.gImageBitmap("", 0, 0);
            this._topPart = UICompomentPool.getUICompoment(GSprite);
            this._topPart.x = SceneRange.display.width - this._topPart.width >> 1;
            this._topPart.y = 20;
            var _loc_9:Boolean = false;
            this._topPart.mouseEnabled = false;
            this._topPart.mouseChildren = _loc_9;
            this.addChild(this._topPart);
            this._levelBg = UIFactory.gBitmap("", 0, 0, this._topPart);
            this._name = UIFactory.gImageBitmap("", 0, 11, this._topPart);
            var _loc_2:* = GlobalStyle.textFormatLv.left();
            _loc_2.size = 20;
            this._level = UIFactory.gTextField("", 0, 20, 80, 35, this._topPart, _loc_2);
            this._bottomPart = UICompomentPool.getUICompoment(GSprite);
            this._bottomPart.x = SceneRange.display.width - 345 >> 1;
            this._bottomPart.y = SceneRange.display.height - 145 - 15;
            this.addChild(this._bottomPart);
            this._skillItem = UICompomentPool.getUICompoment(WizardSkillItem);
            this._skillItem.setBg(ImagesConst.EquipItemBg, 6, 6);
            this._skillItem.setSize(48, 48);
            this._skillItem.x = 26;
            this._skillItem.y = 82;
            this._bottomPart.addChild(this._skillItem);
            this._starPanel = UIFactory.getUICompoment(StarPointPanel);
            this._starPanel.x = 97;
            this._starPanel.y = 88;
            this._bottomPart.addChild(this._starPanel);
            this._starPanel.setStarStyle(ImagesConst.WiardStarLight, ImagesConst.WiardStarDark, 35);
            _loc_2 = GlobalStyle.textFormatBai.center();
            _loc_2.size = 12;
            this._skillInfoTxt = UIFactory.gTextField("", 70, 50, 220, 35, this._bottomPart, _loc_2);
            this._starUpBtn = UIFactory.gLoadingButton(ResFileConst.WizardStarUpBtn, 268, 64, 76, 76, this._bottomPart);
            this._starUpBtn.configEventListener(MouseEvent.CLICK, this.upgradeHandler);
            this._starUpBtn.drawNow();
            this._activeWizardBtn = UIFactory.gLoadingButton(ResFileConst.WizardActiveBtn, 268, 64, 76, 76, this._bottomPart);
            this._activeWizardBtn.drawNow();
            this._activeWizardBtn.configEventListener(MouseEvent.CLICK, this.activeSprite);
            this._xhclTxt = UIFactory.gTextField(Language.getString(35615), 72, 140, 150, 60, this._bottomPart, GlobalStyle.textFormatBai.center());
            this._levelUpItem = UICompomentPool.getUICompoment(BaseItem);
            this._levelUpItem.x = 184;
            this._levelUpItem.y = 136;
            this._levelUpItem.setItemStyle(ItemStyleConst.Small, ImagesConst.PackItemBg, 2, 2);
            this._bottomPart.addChild(this._levelUpItem);
            this._levelUpItemtxt = UIFactory.gTextField("", 227, 151, 50, 20, this._bottomPart, GlobalStyle.textFormatDanLan);
            this._leftPart = UICompomentPool.getUICompoment(GSprite);
            this.addChild(this._leftPart);
            this._tabBar = UIFactory.tileList(30, 25, 345, 700, this._leftPart);
            this._tabBar.columnWidth = 210;
            this._tabBar.rowHeight = 63;
            this._tabBar.horizontalGap = 0;
            this._tabBar.verticalGap = -5;
            this._tabBar.setStyle("skin", new Bitmap());
            this._tabBar.setStyle("cellRenderer", WizardTabCellRenderer);
            this._tabBar.configEventListener(Event.CHANGE, this.tabBarChangeHandler);
            this._decName = UIFactory.gImageBitmap("", 32, 485, this._leftPart);
            this._decTxt = UIFactory.gTextField("", 45, 530, 220, 200, this._leftPart, _loc_1);
            this._decTxt.wordWrap = true;
            this._decTxt.multiline = true;
            this._rightPart = UICompomentPool.getUICompoment(GSprite);
            this.addChild(this._rightPart);
            this._soulBg = UIFactory.gImageBitmap("", 0, 238, this._rightPart);
            this._upgradeBtn = UIFactory.gLoadingButton(ResFileConst.WizardUpgrade, 83, 555, 110, 33, this._rightPart);
            this._upgradeBtn.name = "Wizard_UpgradeBtn";
            this._upgradeBtn.drawNow();
            this._upgradeBtn.configEventListener(MouseEvent.CLICK, this.upgradeHandler);
            this._upgradeBtn.configEventListener(MouseEvent.MOUSE_OVER, this.showAttrUp);
            this._upgradeBtn.configEventListener(MouseEvent.MOUSE_OUT, this.hidAttrUp);
            this._consumeBox = UIFactory.gConsumeBox("", 10, 587, 0, this._rightPart);
            this._consumeBox.addItem(ConsumeData.UseMoneyType, EPriceUnit._EPriceUnitVitalEnergy, 0, Language.getString(30409), "2");
            this._consumeBox.addItem(ConsumeData.UseMoneyType, EPriceUnit._EPriceUnitCoinBind, 0, Language.getString(30408), "1");
            this._consumeBox2 = UIFactory.gConsumeBox("", 10, 608, 0, this._rightPart);
            this._consumeBox2.addItem(ConsumeData.UseMoneyType, EPriceUnit._EPriceUnitVitalEnergy, 0, Language.getString(30410), "3");
            _loc_1 = GlobalStyle.textFormatBai.center();
            _loc_1.size = 16;
            this._rate = UIFactory.gTextField("", 170, 590, 150, 30, this._rightPart, _loc_1);
            this._autoUseGold = UIFactory.checkBox("", -15, 590, 210, 28, this._rightPart);
            this._autoUseGold.selected = this._isUseGold;
            this._autoUseGold.configEventListener(Event.CHANGE, this.selectedChangeHandler);
            this._attrSprite = UICompomentPool.getUICompoment(GSprite);
            this._attrSprite.x = 19;
            this._attrSprite.y = 140;
            this._attrSprite.name = "wizard_SoulPanel";
            this._rightPart.addChild(this._attrSprite);
            this._rightPart.addChild(this._upgradeBtn);
            this._soulPanel = UICompomentPool.getUICompoment(WizardSoulPanel);
            this._soulPanel.x = -200;
            this._soulPanel.y = 145;
            this._attrSprite.addChild(this._soulPanel);
            this._comBat = UIFactory.bitmapNumberText(118, -88, "WizardCombatNum.png", 23, 30, -3, this._attrSprite, 13, BitmapNumberText.Mid);
            this._comBat.text = "0";
            this._attrName = UIFactory.gImageBitmap("", 32, -144, this._attrSprite);
            this._vcAttributeName2.length = 0;
            this._vcAttributeNameText.length = 0;
            this._vcAttributeValueText.length = 0;
            this._vcAttributeAddValueText.length = 0;
            this._vcAttributeAddValueBitMap.length = 0;
            var _loc_3:* = WizardConfig.instance.vcAttributeName;
            while (_loc_8 < _loc_3.length)
            {
                
                _loc_7 = GlobalStyle.textFormatAnHuan;
                _loc_7.size = 12;
                _loc_4 = UIFactory.gTextField(GameDefConfig.instance.getAttributeName2(_loc_3[_loc_8]), 0 + _loc_8 % 2 * 130, 9 * (_loc_8 - _loc_8 % 2) + 60, 55, 20, this._attrSprite, _loc_7);
                this._vcAttributeNameText.push(_loc_4);
                pushUIToDisposeVec(_loc_4);
                _loc_5 = UIFactory.bitmapNumberText(47 + _loc_8 % 2 * 130, 9 * (_loc_8 - _loc_8 % 2) + 65, "RoleInfoNum.png", 8, 10, -1, this._attrSprite, 14);
                _loc_5.value = 0;
                this._vcAttributeValueText.push(_loc_5);
                pushUIToDisposeVec(_loc_5);
                _loc_4 = UIFactory.gTextField("", 100 + _loc_8 % 2 * 130, 9 * (_loc_8 - _loc_8 % 2) + 59, 60, 20, this._attrSprite, GlobalStyle.textFormatItemGreen.left());
                this._vcAttributeAddValueText.push(_loc_4);
                pushUIToDisposeVec(_loc_4);
                _loc_6 = UIFactory.gBitmap(ImagesConst.ascendingSortBtn_upSkin, 85 + _loc_8 % 2 * 130, 9 * (_loc_8 - _loc_8 % 2) + 63, this._attrSprite);
                _loc_6.visible = false;
                this._vcAttributeAddValueBitMap.push(_loc_6);
                pushUIToDisposeVec(_loc_6);
                _loc_8++;
            }
            this.createEquipList();
            this.add3d();
            LoaderHelp.addResCallBack(ResFileConst.wizard, this.showSkin);
            Global.stage.addEventListener(MouseEvent.MOUSE_WHEEL, this.moduleScale);
            Global.stage.addEventListener(MouseEvent.MOUSE_DOWN, this.startTurn);
            Global.stage.addEventListener(MouseEvent.MOUSE_UP, this.stopTurn);
            this.playTransferEffect();
            this.stageResize();
            return;
        }// end function

        private function showSkin() : void
        {
            if (isDisposed)
            {
                return;
            }
            pushUIToDisposeVec(UIFactory.gBitmap(ImagesConst.WizardTotalAttrBg, 0, 0, this._rightPart));
            var _loc_1:* = UIFactory.gBitmap(ImagesConst.WizardSkillBg, -38, 15, this._bottomPart);
            this._bottomPart.addChildAt(_loc_1, 0);
            this.pushUIToDisposeVec(_loc_1);
            this._leftPart.addChild(this._decTxt);
            this._rightPart.addChild(this._attrSprite);
            this._tabBar.dataProvider = this.getDateProvider();
            this.tabBarChangeHandler();
            LoaderHelp.setBitmapdata("WizardRoleBg.swf", this._roleBg, 0, 0, -1, -1, this.addImg2d);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this._upgradeBtn.name = "";
            Global.stage.removeEventListener(MouseEvent.MOUSE_DOWN, this.startTurn);
            Global.stage.removeEventListener(MouseEvent.MOUSE_UP, this.stopTurn);
            Global.stage.removeEventListener(MouseEvent.MOUSE_WHEEL, this.moduleScale);
            this.remove3d();
            this.removeEffect();
            if (this._scale9gridImg2d)
            {
                this._scale9gridImg2d.dispose(param1);
                this._scale9gridImg2d = null;
            }
            if (this._img2d)
            {
                this._img2d.dispose(param1);
                this._img2d = null;
            }
            if (this._bodyPlayer)
            {
                FrEventDispatcher.instance.proxyRemoveEventListener(this._bodyPlayer, Engine3dEventName.InitComplete, this.onInitBodyPlayer);
                this._rect3d.disposeObj3d(this._bodyPlayer);
                this._bodyPlayer = null;
            }
            if (this._lastBodyPlayer)
            {
                this._rect3d.disposeObj3d(this._lastBodyPlayer);
                this._lastBodyPlayer = null;
            }
            if (this._rect3d)
            {
                Rect3DManager.instance.disposeRect3d(this._rect3d);
                this._rect3d.disposeObj3d(this._effectPlayer);
                this._effectPlayer = null;
                this._rect3d = null;
                this._scale9gridImg2d = null;
                this._img2d = null;
            }
            this.timerContorler.unActive();
            this._attrSprite.name = "";
            this._attrSprite.dispose(param1);
            this._attrSprite = null;
            this._skillInfoTxt.dispose(param1);
            this._skillInfoTxt = null;
            this._consumeBox.dispose(param1);
            this._consumeBox = null;
            this._consumeBox2.dispose(param1);
            this._consumeBox2 = null;
            this._xhclTxt.dispose(param1);
            this._xhclTxt = null;
            this._comBat.dispose(param1);
            this._comBat = null;
            this._roleBg.dispose(param1);
            this._roleBg = null;
            this._starPanel.dispose(param1);
            this._starPanel = null;
            this._tabBar.dispose(param1);
            this._tabBar = null;
            this._soulPanel.dispose(param1);
            this._soulPanel = null;
            this._upgradeBtn.dispose(param1);
            this._upgradeBtn = null;
            this._activeWizardBtn.dispose(param1);
            this._activeWizardBtn = null;
            this._name.dispose(param1);
            this._name = null;
            this._starUpBtn.dispose(param1);
            this._starUpBtn = null;
            this._level.dispose(param1);
            this._level = null;
            this._decName.dispose(param1);
            this._decName = null;
            this._decTxt.dispose(param1);
            this._decTxt = null;
            this._autoUseGold.dispose(param1);
            this._autoUseGold = null;
            this._rate.dispose(param1);
            this._rate = null;
            this._levelUpItem.dispose(param1);
            this._levelUpItem = null;
            this._levelUpItemtxt.dispose(param1);
            this._levelUpItemtxt = null;
            this._topPart.dispose(param1);
            this._topPart = null;
            this._bottomPart.dispose(param1);
            this._bottomPart = null;
            this._leftPart.dispose(param1);
            this._leftPart = null;
            this._rightPart.dispose(param1);
            this._rightPart = null;
            this._attrName.dispose(param1);
            this._attrName = null;
            this._3dRotationSp.dispose(param1);
            this._3dRotationSp = null;
            this._3dRotationBm.dispose(param1);
            this._3dRotationBm = null;
            this._soulBg.dispose(param1);
            this._soulBg = null;
            this._skillItem.dispose(param1);
            this._skillItem = null;
            if (this._levelBg)
            {
                this._levelBg.dispose(param1);
                this._levelBg = null;
            }
            this._vcAttributeName2.length = 0;
            this._vcAttributeNameText.length = 0;
            this._vcAttributeValueText.length = 0;
            this._vcAttributeAddValueText.length = 0;
            this._vcAttributeAddValueBitMap.length = 0;
            this._spEquipMentList.length = 0;
            this._effectEquip = null;
            this._effectSkill = null;
            this._lastWizardModel = null;
            this._currentWizardData = null;
            if (this._showTween)
            {
                this._showTween.kill();
                this._showTween = null;
            }
            if (this._hideTween)
            {
                this._hideTween.kill();
                this._hideTween = null;
            }
            if (this._extShowTween)
            {
                this._extShowTween.kill();
                this._extShowTween = null;
            }
            if (this._extHideTween)
            {
                this._extHideTween.kill();
                this._extHideTween = null;
            }
            super.disposeImpl(param1);
            return;
        }// end function

        private function startTurn(event:MouseEvent) : void
        {
            this._startX = this.mouseX;
            this._startY = this.mouseY;
            this._3dRotationSp.configEventListener(MouseEvent.MOUSE_MOVE, this.turning);
            return;
        }// end function

        private function stopTurn(event:MouseEvent) : void
        {
            this._3dRotationSp.removeEventListener(MouseEvent.MOUSE_MOVE, this.turning);
            return;
        }// end function

        private function turning(event:MouseEvent) : void
        {
            this._endX = this.mouseX;
            this._endY = this.mouseY;
            if (this._bodyPlayer)
            {
                this._bodyPlayer.rotationY = this._bodyPlayer.rotationY - (this._endX - this._startX) / 3;
                this._bodyPlayer.y = this._bodyPlayer.y - (this._endY - this._startY);
            }
            this._startX = this._endX;
            this._startY = this._endY;
            return;
        }// end function

        private function moduleScale(event:MouseEvent) : void
        {
            if (this._bodyPlayer.scaleValue + event.delta / 10 > 5)
            {
                this._bodyPlayer.scaleValue = 5;
            }
            else if (this._bodyPlayer.scaleValue + event.delta / 10 < 1)
            {
                this._bodyPlayer.scaleValue = 1;
            }
            else
            {
                this._bodyPlayer.scaleValue = this._bodyPlayer.scaleValue + event.delta / 10;
                this._bodyPlayer.y = this._bodyPlayer.y - 13 * event.delta;
            }
            return;
        }// end function

        private function addImg2d() : void
        {
            if (this._roleBg)
            {
                if (this._img2d == null)
                {
                    this._img2d = new Img2D(null, this._roleBg.bitmapData, new Rectangle(0, 0, 1000, 600), false);
                    this._rect3d.addImg(this._img2d, Layer3DManager.MapLayer);
                }
            }
            this.stageResize();
            if (this._window != null)
            {
                this._window.dispatchEvent(new WindowEvent(WindowEvent.SHOW));
                Dispatcher.dispatchEvent(new DataEvent(EventName.WindowShowed, this._window));
            }
            return;
        }// end function

        protected function add3d() : void
        {
            var _loc_1:Rectangle = null;
            this._rect3d = Rect3DManager.instance.getRect3dByWindow(this._window);
            if (!this._rect3d)
            {
                this._rect3d = Rect3DManager.instance.registerWindow(false, new Rectangle(0, 0, 615, 230), this._window, true);
            }
            Rect3DManager.instance.windowShowHander(null, this._window);
            if (this._scale9gridImg2d == null)
            {
                _loc_1 = new Rectangle(10, 10, 5, 10);
                this._scale9gridImg2d = new Scale9GridImg2DEx(null, GlobalClass.getBitmapData(ImagesConst.WizardBg), false, _loc_1);
                this._rect3d.addImg(this._scale9gridImg2d, Layer3DManager.backGroudImgLayer);
            }
            return;
        }// end function

        protected function update3dModel() : void
        {
            var showAction:Function;
            var model:TModel;
            var meshUrl:String;
            var boneUrl:String;
            var isFirstOpen:Boolean;
            showAction = function () : void
            {
                setActionName(ActionName.Standing);
                addEffect("effect1");
                return;
            }// end function
            ;
            if (this._rect3d && this._currentWizardData)
            {
                if (this._lastWizardModel)
                {
                    this.hideBodyPLayer();
                }
                model = ModelConfig.instance.getInfoByCode(int(this._currentWizardData.tSprite.modelId));
                meshUrl = model.mesh1 + ".md5mesh";
                boneUrl = model.bone1 + ".skeleton";
                if (this._bodyPlayer == null)
                {
                    this._bodyPlayer = FrObjectPool.getObject(WizardActionPlayer, this);
                    FrEventDispatcher.instance.proxyAddEventListener(this._bodyPlayer, Engine3dEventName.InitComplete, this.onInitBodyPlayer);
                    this._bodyPlayer.timerContorler = this.timerContorler;
                }
                this.timerContorler.active();
                isFirstOpen = this._lastWizardModel == null;
                this._bodyPlayer.clearExtend();
                this._bodyPlayer.load(meshUrl, boneUrl, model.texture1, this._rect3d.renderList);
                if (model.mesh2)
                {
                    meshUrl = model.mesh2 + ".md5mesh";
                    boneUrl = model.bone2 + ".skeleton";
                    this._bodyPlayer.loadExtend(meshUrl, boneUrl, model.texture2, this._rect3d.renderList);
                    this._bodyPlayer.extendPlayer.timerContorler = this.timerContorler;
                }
                this._bodyPlayer.play();
                this._bodyPlayer.rotationY = 0;
                this._lastWizardModel = model;
                if (isFirstOpen)
                {
                    this._bodyPlayer.scaleValue = 3;
                    this._rect3d.addObject3d(this._bodyPlayer, SceneRange.display.width - 20 >> 1, SceneRange.display.height + 420 >> 1, false);
                    this._modelX = this._bodyPlayer.x;
                    this._modelY = this._bodyPlayer.y;
                    this.setActionName(ActionName.Standing);
                    this.addEffect("effect1");
                }
                else
                {
                    this._bodyPlayer.scaleValue = 1.5;
                    this.setActionName(ActionName.Stand);
                    this._bodyPlayer.alpha = 0;
                    this._rect3d.addObject3d(this._bodyPlayer, 0, SceneRange.display.height + 420 >> 1, false);
                    this._bodyPlayer.x = this._modelX - 380;
                    this._bodyPlayer.y = this._modelY + 80;
                    this._showTween = TweenMax.to(this._bodyPlayer, 1.5, {x:this._modelX, y:this._modelY, alpha:1, scaleValue:3, ease:Quint.easeOut, frameInterval:1, onComplete:showAction});
                    this.removeEffect();
                }
            }
            return;
        }// end function

        private function hideBodyPLayer() : void
        {
            this.removeEffect();
            this.removeLastBody();
            this._lastBodyPlayer = this._bodyPlayer;
            this._lastBodyPlayer.alpha = 1;
            this._hideTween = TweenMax.to(this._lastBodyPlayer, 0.8, {x:this._modelX + 380, y:this._modelY + 80, alpha:0, scaleValue:1.5, ease:Quint.easeOut, frameInterval:1, onComplete:this.removeLastBody});
            this._bodyPlayer = null;
            return;
        }// end function

        private function removeLastBody() : void
        {
            if (this._lastBodyPlayer)
            {
                this._rect3d.disposeObj3d(this._lastBodyPlayer);
                this._lastBodyPlayer = null;
                this.timerContorler.active();
            }
            return;
        }// end function

        private function addEffect(param1:String) : void
        {
            var _loc_3:Vector.<Array> = null;
            var _loc_4:Array = null;
            var _loc_5:Array = null;
            var _loc_6:int = 0;
            var _loc_7:EffectPlayer = null;
            this.removeEffect();
            var _loc_2:* = ModelConfig.instance.getInfoByCode(int(this._currentWizardData.tSprite.modelId));
            if (_loc_2.effect1)
            {
                _loc_3 = GameStrUtil.alzToArray(_loc_2[param1]);
                _loc_4 = _loc_3[0];
                _loc_5 = _loc_3[1];
                _loc_6 = 0;
                while (_loc_6 < _loc_4.length)
                {
                    
                    _loc_7 = EffectPlayerPool.instance.getEffectPlayer(_loc_4[_loc_6], null, this._rect3d.renderList, false);
                    if (_loc_7.temple is TempleRole)
                    {
                        (_loc_7.temple as TempleRole).setRoleParams(this._bodyPlayer, null, null);
                    }
                    else
                    {
                        _loc_7.hangBoneName = _loc_5[_loc_6];
                        this._bodyPlayer.hang(_loc_7);
                    }
                    _loc_7.play(PlayMode.ANIMATION_LOOP_MODE);
                    this._effectVec.push(_loc_7);
                    _loc_6++;
                }
            }
            return;
        }// end function

        protected function onInitBodyPlayer(event:Event) : void
        {
            if (this._bodyPlayer)
            {
                this._bodyPlayer.addFrameComplete(ActionName.Standing, this.onFrameComplete);
            }
            return;
        }// end function

        private function onFrameComplete() : void
        {
            if (!this._bodyPlayer)
            {
                return;
            }
            this.setActionName(ActionName.Stand);
            this.addEffect("hangModel1");
            return;
        }// end function

        private function removeEffect() : void
        {
            var _loc_1:EffectPlayer = null;
            for each (_loc_1 in this._effectVec)
            {
                
                _loc_1.dispose(true);
            }
            this._effectVec.length = 0;
            return;
        }// end function

        public function setActionName(param1:String) : void
        {
            this._bodyPlayer.changeAction(param1);
            return;
        }// end function

        private function setAttrData() : void
        {
            var _loc_5:int = 0;
            var _loc_1:* = Cache.instance.wizard.soulList;
            var _loc_2:* = WizardConfig.instance.vcAttributeName;
            var _loc_3:* = _loc_1.length;
            var _loc_4:* = _loc_2.length;
            var _loc_6:int = 0;
            while (_loc_6 < _loc_4)
            {
                
                _loc_5 = 0;
                EffectManager.glowFilterUnReg(this._vcAttributeValueText[_loc_6]);
                if (this._currentWizardData.isHasWizard)
                {
                    this._vcAttributeValueText[_loc_6].text = this._currentWizardData.spriteInfo.attributes[_loc_6].toString();
                }
                else
                {
                    this._vcAttributeValueText[_loc_6].text = "0";
                }
                _loc_6++;
            }
            return;
        }// end function

        private function getDateProvider() : DataProvider
        {
            var _loc_3:int = 0;
            var _loc_4:WizardData = null;
            var _loc_5:Object = null;
            var _loc_1:* = new DataProvider();
            var _loc_2:* = Cache.instance.wizard.soulList;
            if (Global.isDebugModle)
            {
                _loc_3 = 8;
            }
            else
            {
                _loc_3 = 4;
            }
            for each (_loc_4 in _loc_2)
            {
                
                if (_loc_4.code <= _loc_3)
                {
                    _loc_5 = {data:_loc_4};
                    _loc_1.addItem(_loc_5);
                }
            }
            return _loc_1;
        }// end function

        private function activeSprite(event:MouseEvent) : void
        {
            if (this._currentWizardData)
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.WizardItemUse, this._currentWizardData));
            }
            return;
        }// end function

        private function upgradeHandler(event:MouseEvent) : void
        {
            if (this._currentWizardData == null)
            {
                return;
            }
            if (!this._currentWizardData.isHasWizard)
            {
                MsgManager.showRollTipsMsg(Language.getString(30411));
                return;
            }
            if (event.target == this._upgradeBtn)
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.WizardUpgradeSoul, this._currentWizardData));
            }
            else if (event.target == this._starUpBtn)
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.WizardUpgradeSkill, this._currentWizardData));
            }
            return;
        }// end function

        private function tabBarChangeHandler(event:Event = null) : void
        {
            this.data = this._tabBar.selectedItem.data as WizardData;
            return;
        }// end function

        private function selectedChangeHandler(event:Event) : void
        {
            this._isUseGold = this._autoUseGold.selected;
            this._rate.htmlText = Language.getStringByParam(30406, " " + (this._isUseGold ? (100) : (this._currentWizardData.tSprite.rate)));
            return;
        }// end function

        private function hideLevelUp(event:MouseEvent) : void
        {
            if (this._effectEquip)
            {
                EffectManager.glowFilterUnReg(this._effectEquip);
                if (event.currentTarget.visible)
                {
                    this._effectEquip.enabled = false;
                }
            }
            if (this._effectSkill)
            {
                EffectManager.glowFilterUnReg(this._effectSkill);
                if (event.currentTarget.visible)
                {
                    this._effectSkill.enabled = false;
                }
            }
            return;
        }// end function

        private function showAttrUp(event:MouseEvent = null) : void
        {
            if (event)
            {
                this._isOver = true;
            }
            if (!this._isOver || this._currentWizardData == null)
            {
                return;
            }
            var _loc_2:* = WizardConfig.instance.vcAttributeName;
            var _loc_3:* = _loc_2.length;
            var _loc_4:int = 0;
            var _loc_5:int = 0;
            while (_loc_5 < _loc_3)
            {
                
                this._vcAttributeAddValueText[_loc_5].text = this._currentWizardData.tSprite[_loc_2[_loc_5]];
                this._vcAttributeAddValueBitMap[_loc_5].visible = true;
                _loc_5++;
            }
            return;
        }// end function

        private function hidAttrUp(event:MouseEvent = null) : void
        {
            if (event)
            {
                this._isOver = false;
            }
            var _loc_2:* = this._vcAttributeAddValueText.length;
            var _loc_3:int = 0;
            while (_loc_3 < _loc_2)
            {
                
                this._vcAttributeAddValueText[_loc_3].text = "";
                this._vcAttributeAddValueBitMap[_loc_3].visible = false;
                _loc_3++;
            }
            return;
        }// end function

        private function set data(param1:WizardData) : void
        {
            this._currentWizardData = param1;
            LoaderHelp.setBitmapdata("WizardSoulBg_" + this._currentWizardData.code + ".swf", this._soulBg);
            this._name.imgUrl = "Sprite" + (this._tabBar.selectedIndex + 1) + "_overSkin";
            this._decName.imgUrl = "Sprite" + (this._tabBar.selectedIndex + 1) + "_overSkin";
            this._attrName.imgUrl = "Sprite" + (this._tabBar.selectedIndex + 1) + "_overSkin";
            this._decTxt.text = WizardConfig.instance.getSpriteByCodeAndLevel(this._currentWizardData.tSprite.code, 1).descStr;
            this.update3dModel();
            this.refreshSprite();
            this.setAttrData();
            return;
        }// end function

        public function showSelectWizard() : void
        {
            this._tabBar.dataProvider = this.getDateProvider();
            this.tabBarChangeHandler();
            return;
        }// end function

        private function createEquipList() : void
        {
            var _loc_1:OtherEquipItem = null;
            var _loc_2:int = 0;
            this._spEquipMentList = new Vector.<OtherEquipItem>;
            while (_loc_2 < 4)
            {
                
                _loc_1 = UICompomentPool.getUICompoment(OtherEquipItem);
                _loc_1.setItemStyle(ItemStyleConst.Small, ImagesConst.EquipItemBg, 7, 7);
                _loc_1.x = 55 * _loc_2 + 15;
                _loc_1.y = -25;
                _loc_1.isDragAble = false;
                _loc_1.isDragAble = false;
                _loc_1.isShowLock = true;
                _loc_1.doubleClickEnabled = true;
                _loc_1.configEventListener(MouseEvent.CLICK, this.openSmallWin);
                _loc_1.configEventListener(MouseEvent.DOUBLE_CLICK, this.putOffEquip);
                this.pushUIToDisposeVec(_loc_1);
                this._spEquipMentList.push(_loc_1);
                this._attrSprite.addChild(_loc_1);
                _loc_2++;
            }
            return;
        }// end function

        private function openSmallWin(event:MouseEvent) : void
        {
            var _loc_2:* = event.currentTarget as OtherEquipItem;
            return;
        }// end function

        private function putOffEquip(event:MouseEvent) : void
        {
            var _loc_2:* = event.currentTarget as OtherEquipItem;
            var _loc_3:* = new Object();
            var _loc_4:* = Cache.instance.pack.getWizardPackCacheByCode(this._currentWizardData.tSprite.code);
            _loc_3.putonitemData = "";
            _loc_3.getoffItemData = _loc_4.getEquipByType(_loc_2.itemData.itemInfo.type);
            _loc_3.code = this._currentWizardData.tSprite.code;
            Dispatcher.dispatchEvent(new DataEvent(EventName.WizardEquip, _loc_3));
            return;
        }// end function

        public function updateEquipList() : void
        {
            var _loc_3:ItemInfo = null;
            var _loc_5:WizardPackCache = null;
            var _loc_6:Array = null;
            var _loc_7:int = 0;
            var _loc_8:ItemData = null;
            var _loc_1:* = WizardConfig.instance.getSpriteByCodeAndLevel(this._currentWizardData.code, 1);
            var _loc_2:* = _loc_1.equipId.split("#");
            var _loc_4:int = 0;
            while (_loc_4 < _loc_2.length)
            {
                
                _loc_3 = ItemConfig.instance.getConfig(int(_loc_2[_loc_4]));
                this._spEquipMentList[_loc_4].itemData = new ItemData(_loc_3.code);
                this._spEquipMentList[_loc_4].labelText = _loc_3.name;
                this._spEquipMentList[_loc_4].enabled = false;
                this._spEquipMentList[_loc_4].clearStrengInfo();
                _loc_4++;
            }
            if (this._currentWizardData.isHasWizard)
            {
                _loc_5 = Cache.instance.pack.getWizardPackCacheByCode(this._currentWizardData.tSprite.code);
                if (_loc_5)
                {
                    _loc_6 = _loc_5.allItems;
                    _loc_7 = _loc_6.length;
                    _loc_4 = 0;
                    while (_loc_4 < _loc_7)
                    {
                        
                        _loc_8 = _loc_6[_loc_4];
                        if (_loc_8)
                        {
                            this._spEquipMentList[_loc_8.itemInfo.type].itemData = _loc_8;
                            this._spEquipMentList[_loc_8.itemInfo.type].labelText = "";
                            this._spEquipMentList[_loc_8.itemInfo.type].enabled = true;
                            this._spEquipMentList[_loc_8.itemInfo.type].updateStrengLevel(_loc_8.itemInfo.itemLevel);
                        }
                        _loc_4++;
                    }
                }
            }
            return;
        }// end function

        public function updateAttrData() : void
        {
            var value:int;
            var txt:GTextFiled;
            var removeTxt:Function;
            removeTxt = function (param1:GTextFiled) : void
            {
                param1.dispose(true);
                return;
            }// end function
            ;
            this._comBat.addToValue(this._currentWizardData.isHasWizard ? (this._currentWizardData.spriteInfo.combat) : (0));
            var _soulList:* = Cache.instance.wizard.soulList;
            var vcAttributeName:* = WizardConfig.instance.vcAttributeName;
            var soulNum:* = _soulList.length;
            var attrNum:* = vcAttributeName.length;
            var i:int;
            while (i < attrNum)
            {
                
                if (this._currentWizardData.isHasWizard)
                {
                    if (this._vcAttributeValueText[i].text == "" || int(this._vcAttributeValueText[i].text) == this._currentWizardData.spriteInfo.attributes[i])
                    {
                        EffectManager.glowFilterUnReg(this._vcAttributeValueText[i]);
                        EffectManager.glowFilterUnReg(this._vcAttributeNameText[i]);
                    }
                    else if (int(this._vcAttributeValueText[i].text) < this._currentWizardData.spriteInfo.attributes[i])
                    {
                        value = this._currentWizardData.spriteInfo.attributes[i] - int(this._vcAttributeValueText[i].text);
                        EffectManager.glowFilterReg(this._vcAttributeValueText[i], null, 1, 10, 0, 3);
                        EffectManager.glowFilterReg(this._vcAttributeNameText[i], null, 1, 10, 0, 3);
                        txt = UIFactory.gTextField("+" + value, this._vcAttributeValueText[i].x + 50, this._vcAttributeValueText[i].y - 3, 100, 20, this._attrSprite);
                        TweenMax.to(txt, 2, {alpha:0, y:txt.y - 25, ease:Quint.easeOut, onComplete:removeTxt, onCompleteParams:[txt]});
                    }
                    this._vcAttributeValueText[i].text = this._currentWizardData.spriteInfo.attributes[i].toString();
                }
                else
                {
                    this._vcAttributeValueText[i].text = "0";
                    EffectManager.glowFilterUnReg(this._vcAttributeValueText[i]);
                    EffectManager.glowFilterUnReg(this._vcAttributeNameText[i]);
                }
                i = (i + 1);
            }
            this.showAttrUp();
            return;
        }// end function

        public function updateSkill(param1:Boolean = true) : void
        {
            var _loc_2:* = SkillConfig.instance.getInfoById(this._currentWizardData.tSpriteEx.xpskillId);
            var _loc_3:* = new SkillInfo();
            _loc_3.tSkill = _loc_2;
            this._skillItem.skillInfo = _loc_3;
            this._starPanel.totalStar = WizardConfig.instance.getSkillTotalStar(this._currentWizardData.code);
            if (this._currentWizardData.isHasWizard)
            {
                this._starPanel.value = this._currentWizardData.spriteInfo.skillCode;
                this._skillInfoTxt.text = this._starPanel.value + Language.getStringByParam(35616, _loc_3.skillName);
                if (param1)
                {
                    EffectManager.glowFilterReg(this._skillItem, null, 1, 10, 0, 3);
                }
            }
            else
            {
                this._starPanel.value = 0;
                this._skillInfoTxt.text = "";
            }
            if (this._currentWizardData.isMaxStar)
            {
                this._levelUpItemtxt.visible = false;
                this._xhclTxt.visible = false;
                this._levelUpItem.visible = false;
            }
            else
            {
                this.updateItemHandler();
            }
            return;
        }// end function

        private function visibleInitialization() : void
        {
            this._upgradeBtn.filterEnabled = true;
            this._upgradeBtn.visible = true;
            this._consumeBox.visible = true;
            this._consumeBox2.visible = true;
            this._activeWizardBtn.visible = true;
            this._levelUpItemtxt.visible = true;
            this._starUpBtn.visible = true;
            this._xhclTxt.visible = true;
            this._levelUpItem.visible = true;
            this._autoUseGold.visible = false;
            this._rate.visible = false;
            return;
        }// end function

        public function refreshSprite() : void
        {
            this.visibleInitialization();
            this.updateEquipList();
            this._soulPanel.setWizardInfo(this._currentWizardData);
            this._name.x = this._currentWizardData && this._currentWizardData.isHasWizard ? ((this._levelBg.width - (141 + 62)) / 2) : ((this._levelBg.width - 141) / 2);
            this._level.x = this._name.x + 141;
            this.updateSkill(false);
            if (this._currentWizardData.isHasWizard)
            {
                this._activeWizardBtn.visible = false;
                this._comBat.value = this._currentWizardData.spriteInfo.combat;
                this._level.text = "[ " + this._currentWizardData.spriteInfo.SpriteLevel + " ]";
                if (this._currentWizardData.spriteInfo.SpriteLevel >= WizardUtil.maxLevel)
                {
                    this._upgradeBtn.enabled = false;
                    this._upgradeBtn.filters = [FilterConst.colorFilter2];
                    this._autoUseGold.visible = false;
                    this._rate.visible = false;
                    this._consumeBox.visible = false;
                    this._consumeBox2.visible = false;
                }
                else
                {
                    this._consumeBox.resetValue("1", this._currentWizardData.tSprite.coin);
                    this._consumeBox.resetValue("2", this._currentWizardData.tSprite.vitalenergy);
                    this._consumeBox2.resetValue("3", Cache.instance.role.money.vitalEnergy);
                    this.resetConsumeBoxPos();
                }
            }
            else
            {
                this._upgradeBtn.visible = false;
                this._autoUseGold.visible = false;
                this._rate.visible = false;
                this._consumeBox.visible = false;
                this._consumeBox2.visible = false;
                this._starUpBtn.visible = false;
                this._comBat.value = 0;
                this._level.text = "";
            }
            return;
        }// end function

        public function updateItemHandler() : void
        {
            var _loc_1:TSpriteEx = null;
            if (this._currentWizardData == null || this._currentWizardData.isMaxStar)
            {
                return;
            }
            if (this._currentWizardData.isHasWizard)
            {
                _loc_1 = WizardConfig.instance.getTSpriteExByCodeAndStar(this._currentWizardData.code, (this._currentWizardData.spriteInfo.skillCode + 1));
            }
            else
            {
                _loc_1 = WizardConfig.instance.getTSpriteExByCodeAndStar(this._currentWizardData.code, 1);
            }
            this._levelUpItem.itemData = new ItemData(_loc_1.prop);
            this._levelUpItemtxt.htmlText = "*" + _loc_1.amount;
            this._xhclTxt.htmlText = Language.getString(35617) + ItemsUtil.getItemName(this._levelUpItem.itemData);
            var _loc_2:* = Cache.instance.pack.backPackCache.getItemCountByItemCode(_loc_1.prop);
            if (_loc_2 >= _loc_1.amount)
            {
                this._levelUpItem.bitmap.filters = [];
                if (this._currentWizardData.isHasWizard)
                {
                    EffectManager.glowFilterReg(this._starUpBtn, null, 1, 10, 0);
                }
                else
                {
                    EffectManager.glowFilterReg(this._activeWizardBtn, null, 1, 10, 0);
                }
                this._levelUpItem.amount = _loc_2;
            }
            else
            {
                this._levelUpItem.bitmap.filters = [FilterConst.colorFilter2];
                EffectManager.glowFilterUnReg(this._starUpBtn);
                EffectManager.glowFilterUnReg(this._activeWizardBtn);
                this._levelUpItem.setAmountLabel("<font color=\'#df2121\'>" + _loc_2 + "</font>");
            }
            return;
        }// end function

        public function updateMoney() : void
        {
            this._consumeBox2.resetValue("3", Cache.instance.role.money.vitalEnergy);
            return;
        }// end function

        public function playEffect(param1:int) : void
        {
            var _loc_2:String = null;
            var _loc_3:Point = null;
            switch(param1)
            {
                case ESpriteUpdateType._ESpriteUpdateAdd:
                {
                    _loc_2 = "FSFB01_0301_dimian";
                    _loc_3 = new Point(SceneRange.display.width - 20 >> 1, this._bottomPart.y + 25);
                    break;
                }
                case ESpriteUpdateType._ESpriteUpdateSpriteLevelUp:
                {
                    _loc_2 = "tuteng_3_zi";
                    _loc_3 = new Point(SceneRange.display.width - 20 >> 1, SceneRange.display.height >> 1);
                    break;
                }
                case ESpriteUpdateType._ESpriteUpdateAcupointLevelUp:
                {
                    _loc_2 = "tuteng_2_zi";
                    _loc_3 = new Point(SceneRange.display.width - 20 >> 1, SceneRange.display.height >> 1);
                    break;
                }
                case ESpriteUpdateType._ESpriteUpdateChange:
                {
                    _loc_2 = "FSFB01_BOSS02_02";
                    _loc_3 = new Point(SceneRange.display.width - 20 >> 1, this._bottomPart.y + 10);
                    break;
                }
                default:
                {
                    break;
                }
            }
            if (this._rect3d && _loc_2 && _loc_3)
            {
                if (this._effectPlayer)
                {
                    this._rect3d.disposeObj3d(this._effectPlayer);
                }
                this._effectPlayer = EffectPlayerPool.instance.getEffectPlayer(_loc_2, null, this._rect3d.renderList, false);
                this._effectPlayer.play(PlayMode.ANIMATION_STOP_MODE);
                FrEventDispatcher.instance.proxyAddEventListener(this._effectPlayer, Engine3dEventName.PLAYEND, this.playEndHander);
                this._rect3d.addObject3d(this._effectPlayer, _loc_3.x, _loc_3.y);
            }
            return;
        }// end function

        private function playEndHander(event:Event) : void
        {
            var _loc_2:* = event.currentTarget as EffectPlayer;
            if (this._rect3d)
            {
                this._rect3d.disposeObj3d(_loc_2);
            }
            return;
        }// end function

        private function playTransferEffect() : void
        {
            if (this._rect3d)
            {
                if (this._starUpEffectPlayer)
                {
                    this._rect3d.disposeObj3d(this._starUpEffectPlayer);
                }
                this._starUpEffectPlayer = EffectPlayerPool.instance.getEffectPlayer("UI_test02", null, this._rect3d.renderList, false);
                this._starUpEffectPlayer.play(PlayMode.ANIMATION_LOOP_MODE);
                this._rect3d.addObject3d(this._starUpEffectPlayer, this._bottomPart.x + this._starUpBtn.x + 40, this._bottomPart.y + this._starUpBtn.y + 35);
            }
            return;
        }// end function

        private function remove3d() : void
        {
            if (this._rect3d)
            {
                this._rect3d.disposeObj3d(this._effectPlayer);
                this._effectPlayer = null;
                this._rect3d.disposeObj3d(this._starUpEffectPlayer);
                this._starUpEffectPlayer = null;
            }
            return;
        }// end function

        override public function stageResize() : void
        {
            super.stageResize();
            var _loc_1:* = SceneRange.display.width;
            var _loc_2:* = SceneRange.display.height;
            if (this._scale9gridImg2d)
            {
                this._scale9gridImg2d.SetSize(_loc_1, _loc_2, 0, 0);
            }
            this._topPart.x = _loc_1 - 296 >> 1;
            this._topPart.y = 20;
            this._bottomPart.x = _loc_1 - 345 >> 1;
            this._bottomPart.y = _loc_2 - 145 - 35;
            this._leftPart.y = (_loc_2 - this._leftPart.height >> 1) + 30;
            this._rightPart.y = (_loc_2 - 645 >> 1) + 15;
            this._roleBg.x = _loc_1 - this._roleBg.width >> 1;
            this._roleBg.y = _loc_2 - this._roleBg.height >> 1;
            if (_loc_1 >= 1800)
            {
                this._leftPart.x = (_loc_1 >> 1) - 600 - 306;
                this._rightPart.x = (_loc_1 >> 1) + 600;
            }
            else
            {
                this._leftPart.x = 0;
                this._rightPart.x = _loc_1 - 305;
            }
            this.resetConsumeBoxPos();
            if (this._img2d)
            {
                this._img2d.x = this._roleBg.x;
                this._img2d.y = this._roleBg.y;
            }
            if (this._rect3d && this._bodyPlayer)
            {
                this._rect3d.addObject3d(this._bodyPlayer, _loc_1 - 20 >> 1, _loc_2 + 420 >> 1, false);
                this._modelX = this._bodyPlayer.x;
                this._rect3d.addObject3d(this._starUpEffectPlayer, this._bottomPart.x + this._starUpBtn.x + 40, this._bottomPart.y + this._starUpBtn.y + 35);
            }
            return;
        }// end function

        private function resetConsumeBoxPos() : void
        {
            var _loc_1:* = SceneRange.display.height - (this._rightPart.y + this._consumeBox2.y + this._consumeBox2.height + 5);
            if (_loc_1 < 15)
            {
                this._upgradeBtn.y = this._upgradeBtn.y + _loc_1;
                this._consumeBox.y = this._consumeBox.y + _loc_1;
                this._consumeBox2.y = this._consumeBox2.y + _loc_1;
            }
            else
            {
                this._upgradeBtn.y = 555;
                this._consumeBox.y = 587;
                this._consumeBox2.y = 608;
            }
            return;
        }// end function

        public function showFilter(param1:int) : void
        {
            switch(param1)
            {
                case starPanel:
                {
                    EffectManager.glowFilterReg(this._starPanel, [FilterConst.redTipsFilter], 1, 10, 0, 3);
                    break;
                }
                case levelUpItemtxt:
                {
                    EffectManager.glowFilterReg(this._levelUpItemtxt, [FilterConst.redTipsFilter], 1, 10, 0, 3);
                    break;
                }
                case upgradeBtn:
                {
                    EffectManager.glowFilterReg(this._upgradeBtn, null, 1, 10, 0, 6);
                    break;
                }
                case consumeBox2:
                {
                    EffectManager.glowFilterReg(this._consumeBox2, [FilterConst.redTipsFilter], 1, 10, 0, 3);
                }
                default:
                {
                    break;
                }
            }
            return;
        }// end function

    }
}
